package com.commons.utils.enums;

public enum  DataScopeEnum {

    ALL("全部","全部的权限"),THIS_LEVEL("本级","自己部门的权限"),CUSTOMIZE("自定义","自定义的权限");

    private final String value;
    private final String description;

    DataScopeEnum(String value, String description) {
        this.value = value;
        this.description = description;
    }

    public String getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static DataScopeEnum find(String val){
        for(DataScopeEnum dataScopeEnum:DataScopeEnum.values()){
            if(dataScopeEnum.getValue().equals(val)){
                return dataScopeEnum;
            }

        }
        return null;
    }

}
